package org.walkerljl.commons.standard.exception;

import org.walkerljl.commons.exception.AppException;

/**
 * Machine异常
 *
 * @author lijunlin
 */
public class MachineException extends AppException {

    private static final long serialVersionUID = -6786549876849535944L;

    /**
     * 异常码
     */
    protected int code = 0;

    /**
     * 默认构造函数
     */
    public MachineException() {
        super();
    }

    /**
     * 构造函数
     *
     * @param message
     */
    public MachineException(String message) {
        super(message);
    }

    /**
     * 构造函数
     *
     * @param code
     * @param message
     */
    public MachineException(int code, String message) {
        super(message);
        this.code = code;
    }

    /**
     * 构造函数
     *
     * @param e
     */
    public MachineException(Throwable e) {
        super(e);
    }

    /**
     * 构造函数
     *
     * @param message
     * @param e
     */
    public MachineException(String message, Throwable e) {
        super(message, e);
    }

    /**
     * 构造函数
     *
     * @param code
     * @param message
     * @param e
     */
    public MachineException(int code, String message, Throwable e) {
        super(message, e);
        this.code = code;
    }

    /**
     * 获取异常码
     *
     * @return
     */
    public int getCode() {
        return code;
    }
}